* {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

button {
  outline: none;
  border: none;
}

img {
  width: 100%;
}

.carousel-list {
  .carousel-wrapper {
    position: relative;
    width: 550px;
    height: 450px;
    margin: 80px auto 0; // 水平居中
    overflow: hidden;
    user-select: none;
    // 按钮
    .car-button {
      position: absolute;
      width: 25px;
      height: 35px;
      background-color: rgba(0,0,0,.15);
      cursor: pointer;
      // 背景颜色改变时触发动画效果
      transition: background-color .2s ease;
      z-index: 2;

      &::before {
        content: '';
        display: block;
        width: 6px;
        height: 6px;
        border-top: 3px solid #fff;
        border-right: 3px solid #fff;
        transform: rotate(45deg);
      }
      &:hover {
        background-color: rgba(0,0,0,.4);
      }
    }
    // 左右侧按钮
    .car-prev {
      top: 50%;
      left: 0;
      margin-top: -21px;
      border-top-right-radius: 18px;
      border-bottom-right-radius: 18px;

      &::before {
        margin-left: 6px;
        transform: rotate(225deg);
      }
    }
    .car-next {
      top: 50%;
      right: 0;
      margin-top: -21px;
      border-top-left-radius: 18px;
      border-bottom-left-radius: 18px;
      &::before {
        margin-left: 6px;
      }
    }
    // 小圆点实现
    .car-indicators {
      position: absolute;
      left: 40px;
      bottom: 30px;
      height: 18px;
      // 解决 i 圆点间距问题
      font-size: 0;
      cursor: pointer;
      z-index: 2;

      .indicator-btn {
        display: inline-block;
        position: relative;
        width: 18px;
        height: 18px;
        margin-right: 1px;

        &::after,
        &::before {
          content: "";
          display: block;
          position: absolute;
          border-radius: 50%;
        }

        &:hover::after {
          background-color: rgba(255,255,255,0.8);
          border: 2px solid #fff;
        }

        &::after {
          top: 4px;
          left: 4px;
          width: 6px;
          height: 6px;
          border: 2px solid #b9b3ba;
        }

        &.active::after {
          background-color: #fff;
          border: 2px solid #fff;
        }

        &.active::before {
          top: 0;
          left: 0;
          width: 18px;
          height: 18px;
          background-color: rgba(255, 255, 255, 0.3);
        }
      }
    }
  }
}